/**
 *
 */
package gemini.castor.ui.client.service;

import gemini.basic.model.Cart;
import gemini.basic.model.Order;
import gemini.basic.model.Payment;
import gemini.basic.model.Person;

import java.util.ArrayList;

import org.springframework.transaction.annotation.Transactional;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 *
 *
 */
@RemoteServiceRelativePath("shoppingService.rpc")
@Transactional(rollbackFor = Throwable.class, readOnly = false)
public interface ShoppingService extends RemoteService {
	public Cart createCart(Person person);

	public Order saveOrUpdateOrder(Order order);

	public void deleteOrder(Order order);

	public ArrayList<Order> saveOrUpdateOrders(ArrayList<Order> orders);

	public void deleteOrders(ArrayList<Order> orders);

	public void completeCart(int cartId, Payment payment);

	public Cart getOpenCartByDistributorId(int distributorId);

	public void checkOut(Payment payment);
	
}
